package com.acme.bankapp.service.bank;

import com.acme.bankapp.domain.bank.Bank;
import com.acme.bankapp.domain.bank.Client;

import java.util.List;

/**
 * Created by Student on 18.08.2014.
 */
public class BankService {
    public static void addClient(Bank bank, Client client) {
        bank.addClient(client);
    }

    public static List<Client> getClients(Bank bank) {
        return bank.getClients();
    }

    public static void printMaximumAmountToWithdraw(Bank bank) {
        System.out.println("Maximum to withdraw:");
        for (Client client : bank.getClients()) {
            System.out.println(client.getAccounts().maximumAmountToWithdraw());
        }
    }
}
